#查找目标元素是否存在序列中不存在返回-1，存在返回对应下标
def linearSearch(list,target):
    if len(list)<1:
        return -2#传入为空
    index_list = []
    for i in range(len(list)):
        if list[i] == target:
            index_list.append(i)
    return index_list
print(linearSearch([1,1,1,1,1,2,2,22,2,34,5],1))